<template>
    <LayoutWrap class="permission">
        <el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55"> </el-table-column>
            <el-table-column prop="parentModule" label="一级模块"> </el-table-column>
            <el-table-column prop="childModule" label="二级模块"> </el-table-column>
            <el-table-column prop="func" label="功能"> </el-table-column>
            <el-table-column prop="date" label="创建日期"> </el-table-column>
            <el-table-column prop="remark" label="备注"> </el-table-column>
            <el-table-column align="center" label="操作">
                <template v-slot="{row}">
                    <el-button @click="onClickDetail(row)" type="text">
                        查看
                    </el-button>
                    <el-button @click="onClickEdit(row)" type="text">
                        编辑
                    </el-button>
                    <el-button @click="onClickDelete(row)" type="text">
                        删除
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
        <Pagination
            :page-size.sync="formSearch.pageSize"
            :page.sync="formSearch.page"
            :total="formSearch.count"
            @change="onChangePage"
        />
    </LayoutWrap>
</template>
<script>
import {getPermissions, deletePermission} from '@/api/permission';

export default {
    name: 'permission',
    data() {
        return {
            formSearch: {
                pageSize: 10,
                page: 1,
                count: 0
            },
            tableData: [
                {
                    parentModule: {},
                    childModule: {},
                    func: {}
                }
            ]
        };
    },
    created() {
        this.getList();
    },
    methods: {
        onChangePage(value) {
            this.formSearch = {...this.formSearch, ...value};
            this.getList();
        },
        handleSelectionChange() {},
        // 获取列表数据
        getList() {},
        onClickDetail(row) {},
        onClickEdit(row) {},
        onClickDelete(row) {}
    }
};
</script>

<style lang="scss" scoped></style>
